//
//  AnimationCollectionViewCell.m
//  Cartoon
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "AnimationCollectionViewCell.h"

@implementation AnimationCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.underView = [[UIView alloc]init];
        self.underView.backgroundColor = [UIColor colorWithRed:149/255.0 green:198/255.0 blue:64/255.0 alpha:1];
        self.underView.layer.cornerRadius = 5;
        [self.contentView addSubview:self.underView];
        
        self.backView = [[UIView alloc]init];
        [self.contentView addSubview:self.backView];
        self.backView.layer.cornerRadius = 5;
        self.backView.backgroundColor = [UIColor whiteColor];
        
        self.numberLabel = [[UILabel alloc]init];
        self.numberLabel.textAlignment = NSTextAlignmentCenter;
        self.numberLabel.font = [UIFont systemFontOfSize:15];
        self.numberLabel.textColor = [UIColor blackColor];
        [self.contentView addSubview:self.numberLabel];
        
        
    }
    
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.underView.frame = CGRectMake(-1, -1, self.contentView.bounds.size.width + 2, self.contentView.bounds.size.height + 2);
    self.backView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
    self.numberLabel.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height);
}





@end
